<?php
  //Elgg avis blog page
  // Load Elgg engine
	require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
	// Get the specified blog post
  global $uvsq_tabs;
  $uvsq_tabs = true;
  $guid = (int) get_input('guid');
  $entity = get_entity($guid);
	// Set the page owner
  set_page_owner($entity->getOwner());
  $page_owner = get_entity($entity->getOwner());
  //set  title
  if($page_owner == $_SESSION['user']){
    $area2 = '';
    $area2 .= elgg_view("validation_peda/validate", array('entity' => $entity));
  }
	// Display them in the page
	$body = elgg_view_layout("one_column", $area2);
	// Display page
	page_draw(sprintf(elgg_echo('avis:titre'),$page_owner->name),$body);
?>
